package com.peaksport.framework.metadata.view;

import java.io.Serializable;

import com.peaksport.framework.base.entity.IEntityObject;
import com.peaksport.framework.metadata.filter.FilterInfo;
import com.peaksport.framework.metadata.filter.FilterItemInfo;
import com.peaksport.framework.metadata.parse.EntityParse;
import com.peaksport.framework.metadata.selector.SelectorItemCollection;
import com.peaksport.framework.metadata.sorter.SorterItemCollection;

import lombok.Getter;
import lombok.Setter;

/**
 * 
 * 
 *
 * @author jinbin_guo 2019年4月15日
 *
 */
@SuppressWarnings("serial")
@Setter
@Getter
public class EntityViewInfo implements Serializable {
	
		
    /** 管理单元 过滤条件*/
    private FilterItemInfo defaultCUFilterItemInfo;
    /** 过滤条件*/
    private SelectorItemCollection selectorItemCol;
    /** 过滤条件*/
    private FilterInfo filterInfo;
    /** 排序字段*/
    private SorterItemCollection sorterItemCol;
    
    public String toSQL(Class<?> entityClass) {
    	EntityParse parse = new EntityParse();
    	String sql = parse.toSQL(entityClass, this);
    	return sql;
    }
    
}
